// 创建一个路由器，并暴露出去
// 1.引入
import { createRouter,createWebHistory } from "vue-router";

// 引入可能要呈现的组件
import Home from "@/components/Home.vue";
import News from "@/components/News.vue";
import About from "@/components/About.vue";

// 2.创建路由器
const router = createRouter({
  history:createWebHistory(), 
  // 一个一个的路由规则
  routes:[
    {
      path:'/news',
      component:News
    },
    {
      path:'/home',
      component:Home
    },
    
    {
      path:'/about',
      component:About
    },
  ]
})
export default router